import React from 'react';
import axios from 'axios';
import { List, Avatar, Divider, Card } from 'antd';
class Donate extends React.Component {
    state = {
        donateList:[],
      }
    componentWillMount(){
        axios.get('/getDonate')
        .then((response)=> {
            this.setState({
                donateList:response.data
            })
    }).catch((error)=> {
        this.setState({
        })
        });
    }
    render() {
        
        return (
        <div><List
        itemLayout="horizontal"
        dataSource={this.state.donateList}
        renderItem={item => (
          <List.Item>
            <List.Item.Meta
              avatar={<Avatar src="http://mc.hezi.world/temp_.png" />}
              title={<a href="https://mc.hezi.world">{item.name}</a>}
              description={"感谢这位玩家无偿赞助了"+item.money+"元"}
            />
          </List.Item>
        )}
      /></div>
        );
    }
}

export default Donate;